package xin.yangshuai.jackson01.controller;
import java.util.Date;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xin.yangshuai.jackson01.entity.TestJackson;
import xin.yangshuai.jackson01.entity.User;

/**
 * HelloController
 *
 * @author shuai
 * @date 2021/11/10
 */
@RestController
public class HelloController {

    @RequestMapping("hello")
    public TestJackson hello() {
        TestJackson testJackson = new TestJackson("123", "456", "789");

        return testJackson;
    }

    @RequestMapping("user")
    public User user() {

        User user = new User();
//        user.setName("张三");
        user.setBirthday(new Date());
        user.setAge(0);

        return user;
    }


}
